]> granicus.if.org Git - handbrake/commitdiff
When x264 outputs frames as references for b-frame pyramids, flag them as such instea...
authorjbrjake <jb.rubin@gmail.com>
Tue, 12 Feb 2008 15:37:26 +0000 (15:37 +0000)
committerjbrjake <jb.rubin@gmail.com>
Tue, 12 Feb 2008 15:37:26 +0000 (15:37 +0000)
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1257 b64f7644-9d1e-0410-96f1-a4d463321fa5

libhb/encx264.c

index 8b6c22d07e1aeb867590919a702319a2ec405687..f9cbd710028901c07fed058c91f407c02a888453 100644 (file)
@@ -518,7 +518,11 @@ int encx264Work( hb_work_object_t * w, hb_buffer_t ** buf_in,
                             buf->frametype = 0;
                     }
 
-
+                    /* Since libx264 doesn't tell us when b-frames are
+                       themselves reference frames, figure it out on our own. */
+                    if( (buf->frametype == HB_FRAME_B) && (nal[i].i_ref_idc != NAL_PRIORITY_DISPOSABLE) )
+                        buf->frametype = HB_FRAME_BREF;
+                    
                     /* Store the output presentation time stamp
                        from x264 for use by muxmp4 in off-setting
                        b-frames with the CTTS atom. */