diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-01-25 14:36:45 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-01-25 14:36:45 +0100 |
commit | 25be63005f0ba0b4cb8bf2569202ad0e89b4dae3 (patch) | |
tree | 43bf6b49aa89942207f0937cfcab374524795a8f /libavcodec/h264_ps.c | |
parent | b2d0c5bd13ab100a3acb18e9c869d73904e6e764 (diff) | |
parent | b85a5e87af4254b80913fe33591d96361f30832b (diff) | |
download | ffmpeg-25be63005f0ba0b4cb8bf2569202ad0e89b4dae3.tar.gz |
Merge commit 'b85a5e87af4254b80913fe33591d96361f30832b'
* commit 'b85a5e87af4254b80913fe33591d96361f30832b':
lavu: Add av_strnstr()
h264: Allow discarding the cropping information from SPS
Conflicts:
Changelog
doc/APIchanges
libavcodec/avcodec.h
libavcodec/version.h
libavutil/version.h
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/h264_ps.c')
-rw-r--r-- | libavcodec/h264_ps.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/libavcodec/h264_ps.c b/libavcodec/h264_ps.c index a68645bc36..c7bacd9fa3 100644 --- a/libavcodec/h264_ps.c +++ b/libavcodec/h264_ps.c @@ -471,6 +471,20 @@ int ff_h264_decode_seq_parameter_set(H264Context *h){ sps->crop_right = get_ue_golomb(&s->gb); sps->crop_top = get_ue_golomb(&s->gb); sps->crop_bottom= get_ue_golomb(&s->gb); + if (h->s.avctx->flags2 & CODEC_FLAG2_IGNORE_CROP) { + av_log(h->s.avctx, AV_LOG_DEBUG, + "discarding sps cropping, " + "original values are l:%u r:%u t:%u b:%u\n", + sps->crop_left, + sps->crop_right, + sps->crop_top, + sps->crop_bottom); + + sps->crop_left = + sps->crop_right = + sps->crop_top = + sps->crop_bottom = 0; + } if(sps->crop_left || sps->crop_top){ av_log(h->s.avctx, AV_LOG_ERROR, "insane cropping not completely supported, this could look slightly wrong ... (left: %d, top: %d)\n", sps->crop_left, sps->crop_top); } |