Commit 06ab371b authored by jai_menon's avatar jai_menon

Set bits_per_coded_sample in the raw video encoder.

Aside from being the correct thing to do, this also
fixes issue 1299.



git-svn-id: file:///var/local/repositories/ffmpeg/trunk@21083 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 7ea76f9c
......@@ -26,6 +26,7 @@
#include "avcodec.h"
#include "raw.h"
#include "libavutil/pixdesc.h"
#include "libavutil/intreadwrite.h"
static av_cold int raw_init_encoder(AVCodecContext *avctx)
......@@ -33,6 +34,7 @@ static av_cold int raw_init_encoder(AVCodecContext *avctx)
avctx->coded_frame = (AVFrame *)avctx->priv_data;
avctx->coded_frame->pict_type = FF_I_TYPE;
avctx->coded_frame->key_frame = 1;
avctx->bits_per_coded_sample = av_get_bits_per_pixel(&av_pix_fmt_descriptors[avctx->pix_fmt]);
if(!avctx->codec_tag)
avctx->codec_tag = avcodec_pix_fmt_to_codec_tag(avctx->pix_fmt);
return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment