[FFmpeg-cvslog] avdevice/caca: switch to codecpar

Michael Niedermayer git at videolan.org
Mon Apr 11 01:35:12 CEST 2016


ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Sun Apr 10 23:59:12 2016 +0200| [02d08da81fd8ad4bb41c79a57815abc067f0ee2b] | committer: Michael Niedermayer

avdevice/caca: switch to codecpar

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=02d08da81fd8ad4bb41c79a57815abc067f0ee2b
---

 libavdevice/caca.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/libavdevice/caca.c b/libavdevice/caca.c
index 75adc35..93cc0ff 100644
--- a/libavdevice/caca.c
+++ b/libavdevice/caca.c
@@ -92,7 +92,7 @@ static int caca_write_header(AVFormatContext *s)
 {
     CACAContext *c = s->priv_data;
     AVStream *st = s->streams[0];
-    AVCodecContext *encctx = st->codec;
+    AVCodecParameters *encctx = st->codecpar;
     int ret, bpp;
 
     c->ctx = s;
@@ -126,10 +126,10 @@ static int caca_write_header(AVFormatContext *s)
         return AVERROR(EINVAL);
     }
 
-    if (encctx->pix_fmt != AV_PIX_FMT_RGB24) {
+    if (encctx->format != AV_PIX_FMT_RGB24) {
         av_log(s, AV_LOG_ERROR,
                "Unsupported pixel format '%s', choose rgb24\n",
-               av_get_pix_fmt_name(encctx->pix_fmt));
+               av_get_pix_fmt_name(encctx->format));
         return AVERROR(EINVAL);
     }
 
@@ -140,7 +140,7 @@ static int caca_write_header(AVFormatContext *s)
         goto fail;
     }
 
-    bpp = av_get_bits_per_pixel(av_pix_fmt_desc_get(encctx->pix_fmt));
+    bpp = av_get_bits_per_pixel(av_pix_fmt_desc_get(encctx->format));
     c->dither = caca_create_dither(bpp, encctx->width, encctx->height,
                                    bpp / 8 * encctx->width,
                                    0x0000ff, 0x00ff00, 0xff0000, 0);



More information about the ffmpeg-cvslog mailing list