[FFmpeg-devel] [PATCH]Disable cropping in the brainfart case
Carl Eugen Hoyos
cehoyos at ag.or.at
Mon Aug 29 12:58:48 CEST 2011
Hi!
Reimar suggested to add an explanation in Ticket 348.
Please comment, Carl Eugen
-------------- next part --------------
diff --git a/libavcodec/h264_ps.c b/libavcodec/h264_ps.c
index fa99372..e246afa 100644
--- a/libavcodec/h264_ps.c
+++ b/libavcodec/h264_ps.c
@@ -406,7 +406,14 @@ int ff_h264_decode_seq_parameter_set(H264Context *h){
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);
}
if(sps->crop_right >= crop_horizontal_limit || sps->crop_bottom >= crop_vertical_limit){
- av_log(h->s.avctx, AV_LOG_ERROR, "brainfart cropping not supported, this could look slightly wrong ... (right: %d, bottom: %d)\n", sps->crop_right, sps->crop_bottom);
+ av_log(h->s.avctx, AV_LOG_ERROR, "brainfart cropping not supported, cropping disabled (right: %d, bottom: %d)\n", sps->crop_right, sps->crop_bottom);
+ /* It is very unlikely that partial cropping will make anybody happy.
+ * Not cropping at all fixes for example playback of Sisvel 3D
+ * in applications using FFmpeg. */
+ sps->crop_left =
+ sps->crop_right =
+ sps->crop_top =
+ sps->crop_bottom= 0;
}
}else{
sps->crop_left =
More information about the ffmpeg-devel
mailing list