Re: [FFmpeg-devel] [PATCH 1/2] doc/examples/transcoding: Use the decoders pixel format if the encoder does not list which are supported
On Sun, Feb 28, 2016 at 12:17:35AM +0100, Michael Niedermayer wrote: > This affects rawvideo and wraped_avframe, no others are affected atm > > Signed-off-by: Michael Niedermayer > --- > doc/examples/transcoding.c |5 - > 1 file changed, 4 insertions(+), 1 deletion(-) applied patch 1, 2 had objections so not applied [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Freedom in capitalist society always remains about the same as it was in ancient Greek republics: Freedom for slave owners. -- Vladimir Lenin signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH 1/2] doc/examples/transcoding: Use the decoders pixel format if the encoder does not list which are supported
This affects rawvideo and wraped_avframe, no others are affected atm Signed-off-by: Michael Niedermayer --- doc/examples/transcoding.c |5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/doc/examples/transcoding.c b/doc/examples/transcoding.c index d5d410b..8633362 100644 --- a/doc/examples/transcoding.c +++ b/doc/examples/transcoding.c @@ -128,7 +128,10 @@ static int open_output_file(const char *filename) enc_ctx->width = dec_ctx->width; enc_ctx->sample_aspect_ratio = dec_ctx->sample_aspect_ratio; /* take first format from list of supported formats */ -enc_ctx->pix_fmt = encoder->pix_fmts[0]; +if (encoder->pix_fmts) +enc_ctx->pix_fmt = encoder->pix_fmts[0]; +else +enc_ctx->pix_fmt = dec_ctx->pix_fmt; /* video time_base can be set to whatever is handy and supported by encoder */ enc_ctx->time_base = dec_ctx->time_base; } else { -- 1.7.9.5 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel