bug fixes, typos, and omits in yuv mod
[goodguy/history.git] / cinelerra-5.1 / cinelerra / ffmpeg.C
index 1b4e100dfec252dc7295cedafa093a690bba07c5..fc3726e222487fece097b629c66b06fb412edac7 100644 (file)
@@ -690,6 +690,7 @@ int FFAudioStream::decode_frame(AVFrame *frame)
 int FFAudioStream::encode_activate()
 {
        if( writing >= 0 ) return writing;
+       if( !avctx->codec ) return writing = 0;
        frame_sz = avctx->codec->capabilities & CODEC_CAP_VARIABLE_FRAME_SIZE ?
                10000 : avctx->frame_size;
        return FFStream::encode_activate();
@@ -2532,6 +2533,10 @@ int FFMPEG::ff_video_pid(int stream)
        return ffvideo[stream]->st->id;
 }
 
+int FFMPEG::ff_video_mpeg_color_range(int stream)
+{
+       return ffvideo[stream]->st->codecpar->color_range == AVCOL_RANGE_MPEG ? 1 : 0;
+}
 
 int FFMPEG::ff_cpus()
 {