[vlc-commits] transcode: fix user filter codepath on transcoding video
Ilkka Ollakka
git at videolan.org
Mon Jan 14 08:02:17 CET 2019
vlc | branch: master | Ilkka Ollakka <ileoo at videolan.org> | Mon Jan 14 08:38:57 2019 +0200| [0c7cf8cea15d0d3203bb12749ef7a253a09f243b] | committer: Ilkka Ollakka
transcode: fix user filter codepath on transcoding video
Everything in chroma wise and size-wise are already in ok case without
this check, in this codepath we broke the i_chroma for encoder input fmt
and defined it to be encoder output i_chroma, which is usually the
codec. So filter chain ended up trying to find chroma-filtering between
I420 and h264, and failing.
Tested with
"#transcode{vfilter=canvas{width=640,height=640,aspect=16:9},vcodec=h264}:dummy"
and
"#transcode{width=640,height=640,vcodec=h264}:dummy"
Without this change, first case failed and second worked, with this code
removal, both cases worked and produced output file that was correct
resolution and size and playable.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=0c7cf8cea15d0d3203bb12749ef7a253a09f243b
---
modules/stream_out/transcode/video.c | 19 -------------------
1 file changed, 19 deletions(-)
diff --git a/modules/stream_out/transcode/video.c b/modules/stream_out/transcode/video.c
index 90f32a9400..b3f2cb59c8 100644
--- a/modules/stream_out/transcode/video.c
+++ b/modules/stream_out/transcode/video.c
@@ -281,25 +281,6 @@ static void transcode_video_filter_init( sout_stream_t *p_stream,
/* Update encoder so it matches filters output */
transcode_encoder_update_format_in( id->encoder, p_src );
-
- /* FIXME: modifying decoder output size from filters
- * sounds really suspicious an buggy
- * see also size adaption already done in conversion_video_filter_append() */
- const es_format_t *enc_out = transcode_encoder_format_out( id->encoder );
- if( enc_out->video.i_width != p_dst->video.i_width ||
- enc_out->video.i_height != p_dst->video.i_height ||
- enc_out->video.i_sar_num != p_dst->video.i_sar_num ||
- enc_out->video.i_sar_den != p_dst->video.i_sar_den )
- {
- es_format_t tmp;
- es_format_Copy( &tmp, enc_out );
- tmp.video.i_width = p_dst->video.i_width;
- tmp.video.i_height = p_dst->video.i_height;
- tmp.video.i_sar_num = p_dst->video.i_sar_num;
- tmp.video.i_sar_den = p_dst->video.i_sar_den;
- transcode_encoder_update_format_in( id->encoder, &tmp );
- es_format_Clean( &tmp );
- }
}
}
More information about the vlc-commits
mailing list