diff options
author | Vittorio Giovara <vittorio.giovara@gmail.com> | 2013-01-23 12:26:59 +0100 |
---|---|---|
committer | Luca Barbato <lu_zero@gentoo.org> | 2013-01-25 07:50:35 +0100 |
commit | a84fb6e06f7f13e61b5dad0224fa392ebe65e294 (patch) | |
tree | ad954fd6459a0e275edaf06cb30af740cb112751 /libavcodec/h264_ps.c | |
parent | 33552a5f7b6ec7057516f487b1a902331f8c353e (diff) | |
download | ffmpeg-a84fb6e06f7f13e61b5dad0224fa392ebe65e294.tar.gz |
h264: Allow discarding the cropping information from SPS
Some 3D systems overload the meaning of the field for other purposes.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
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 ff6c077ed3..63f371c80c 100644 --- a/libavcodec/h264_ps.c +++ b/libavcodec/h264_ps.c @@ -425,6 +425,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 ...\n"); } |