[FFmpeg-cvslog] h264: 2nd try at getting sm2v working

Michael Niedermayer git at videolan.org
Sun Nov 11 12:57:04 CET 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Nov 11 12:50:03 2012 +0100| [039f4ff4c2f802bd5dc41096d9e84ba4b7e90d41] | committer: Michael Niedermayer

h264: 2nd try at getting sm2v working

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

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

 libavcodec/h264_ps.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/h264_ps.c b/libavcodec/h264_ps.c
index 5ba0744..28d3cbc 100644
--- a/libavcodec/h264_ps.c
+++ b/libavcodec/h264_ps.c
@@ -430,7 +430,7 @@ int ff_h264_decode_seq_parameter_set(H264Context *h){
 
     sps->ref_frame_count= get_ue_golomb_31(&s->gb);
     if (h->s.avctx->codec_tag == MKTAG('S', 'M', 'V', '2'))
-        sps->ref_frame_count= 2;
+        sps->ref_frame_count= FFMAX(2, sps->ref_frame_count);
     if(sps->ref_frame_count > MAX_PICTURE_COUNT-2 || sps->ref_frame_count > 16U){
         av_log(h->s.avctx, AV_LOG_ERROR, "too many reference frames\n");
         goto fail;



More information about the ffmpeg-cvslog mailing list