History

Check for VUI overeading and reset num_reoder_frames. This helps the video from issue1831

Originally committed as revision 23328 to svn://svn.ffmpeg.org/ffmpeg/trunk

Michael Niedermayer committed 16 years ago

Commit f4348e61 parent 577ee941 file · +6 −0Browse files

Unified · Split

libavcodec/h264_ps.c+6−0
@@ -205,6 +205,12 @@ static inline int decode_vui_parameters(H264Context *h, SPS *sps){ · 204 unmodified lines
205 sps->num_reorder_frames= get_ue_golomb(&s->gb);205 sps->num_reorder_frames= get_ue_golomb(&s->gb);
206 get_ue_golomb(&s->gb); /*max_dec_frame_buffering*/206 get_ue_golomb(&s->gb); /*max_dec_frame_buffering*/
207 207
208 if(s->gb.size_in_bits < get_bits_count(&s->gb)){
209 av_log(h->s.avctx, AV_LOG_ERROR, "Overread VUI by %d bits\n", get_bits_count(&s->gb) - s->gb.size_in_bits);
210 sps->num_reorder_frames=0;
211 sps->bitstream_restriction_flag= 0;
212 }
213
208 if(sps->num_reorder_frames > 16U /*max_dec_frame_buffering || max_dec_frame_buffering > 16*/){214 if(sps->num_reorder_frames > 16U /*max_dec_frame_buffering || max_dec_frame_buffering > 16*/){
209 av_log(h->s.avctx, AV_LOG_ERROR, "illegal num_reorder_frames %d\n", sps->num_reorder_frames);215 av_log(h->s.avctx, AV_LOG_ERROR, "illegal num_reorder_frames %d\n", sps->num_reorder_frames);
210 return -1;216 return -1;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t