[FFmpeg-devel] [RFC]Set bpp when encoding Y41P

Carl Eugen Hoyos cehoyos at ag.or.at
Tue Jan 3 18:51:15 CET 2012


Hi!

Attached allows to encode y41p to avi and mov (and allows playback with 32bit 
MPlayer), it "fails" for stream-copy, so additional changes are probably 
necessary.

But perhaps this change is needed / correct in any case?

Carl Eugen
-------------- next part --------------
diff --git a/libavcodec/y41penc.c b/libavcodec/y41penc.c
index aa32403..e5905cf 100644
--- a/libavcodec/y41penc.c
+++ b/libavcodec/y41penc.c
@@ -30,6 +30,7 @@ static av_cold int y41p_encode_init(AVCodecContext *avctx)
     }
 
     avctx->coded_frame = avcodec_alloc_frame();
+    avctx->bits_per_coded_sample = 12;
 
     if (!avctx->coded_frame) {
         av_log(avctx, AV_LOG_ERROR, "Could not allocate frame.\n");


More information about the ffmpeg-devel mailing list