[FFmpeg-cvslog] r11411 - trunk/libavcodec/mpeg12.c
michael
subversion
Sat Jan 5 02:14:09 CET 2008
Author: michael
Date: Sat Jan 5 02:14:09 2008
New Revision: 11411
Log:
Drop non key frames before the first key frame.
Modified:
trunk/libavcodec/mpeg12.c
Modified: trunk/libavcodec/mpeg12.c
==============================================================================
--- trunk/libavcodec/mpeg12.c (original)
+++ trunk/libavcodec/mpeg12.c Sat Jan 5 02:14:09 2008
@@ -2329,8 +2329,10 @@ static int mpeg_decode_frame(AVCodecCont
if(s2->last_picture_ptr==NULL){
/* Skip B-frames if we do not have reference frames. */
if(s2->pict_type==B_TYPE) break;
+ }
+ if(s2->next_picture_ptr==NULL){
/* Skip P-frames if we do not have reference frame no valid header. */
-// if(s2->pict_type==P_TYPE && s2->first_field && !s2->first_slice) break;
+ if(s2->pict_type==P_TYPE && (s2->first_field || s2->picture_structure==PICT_FRAME)) break;
}
/* Skip B-frames if we are in a hurry. */
if(avctx->hurry_up && s2->pict_type==B_TYPE) break;
More information about the ffmpeg-cvslog
mailing list