[FFmpeg-cvslog] Check for resync marker based on vop coding type- vop_fcode_forward and vop_fcode_backward L

Anuj Mittal git at videolan.org
Tue Oct 9 16:55:57 CEST 2012


ffmpeg | branch: master | Anuj Mittal <am.devel at gmail.com> | Tue Oct  9 19:13:14 2012 +0530| [8d2e0e2c7058a3eaf7f45d740be6e93972bbfd68] | committer: Michael Niedermayer

Check for resync marker based on vop coding type- vop_fcode_forward and vop_fcode_backward L

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8d2e0e2c7058a3eaf7f45d740be6e93972bbfd68
---

 libavcodec/ituh263dec.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/libavcodec/ituh263dec.c b/libavcodec/ituh263dec.c
index a7d8d20..6d43233 100644
--- a/libavcodec/ituh263dec.c
+++ b/libavcodec/ituh263dec.c
@@ -214,10 +214,11 @@ const uint8_t *ff_h263_find_resync_marker(MpegEncContext *s, const uint8_t *av_r
     end-=2;
     p++;
     if(s->resync_marker){
+        int prefix_len = ff_mpeg4_get_video_packet_prefix_length(s);
         for(;p<end; p+=2){
             if(!*p){
-                if     (!p[-1] && p[1]) return p - 1;
-                else if(!p[ 1] && p[2]) return p;
+                if      (!p[-1] && ((p[1] >> (23-prefix_len)) == 1)) return p - 1;
+                else if (!p[ 1] && ((p[2] >> (23-prefix_len)) == 1)) return p;
             }
         }
     }



More information about the ffmpeg-cvslog mailing list