FFmpeg-related build and warning fixes.
authorCarl Hetherington <cth@carlh.net>
Tue, 8 Mar 2016 12:43:46 +0000 (12:43 +0000)
committerCarl Hetherington <cth@carlh.net>
Tue, 8 Mar 2016 12:43:46 +0000 (12:43 +0000)
src/lib/ffmpeg_decoder.cc
src/lib/filter_graph.cc

index 3d52448079b449cd69092c476879c69f9886e147..72845a133eb0b11be7a5cfc307e0d0d5ef4addd4 100644 (file)
@@ -130,7 +130,7 @@ FFmpegDecoder::pass (PassReason reason, bool accurate)
                decode_audio_packet ();
        }
 
-       av_free_packet (&_packet);
+       av_packet_unref (&_packet);
        return false;
 }
 
@@ -485,11 +485,11 @@ FFmpegDecoder::decode_bitmap_subtitle (AVSubtitleRect const * rect, ContentTimeP
        shared_ptr<Image> image (new Image (AV_PIX_FMT_RGBA, dcp::Size (rect->w, rect->h), true));
 
        /* Start of the first line in the subtitle */
-       uint8_t* sub_p = rect->pict.data[0];
+       uint8_t* sub_p = rect->data[0];
        /* sub_p looks up into a BGRA palette which is here
           (i.e. first byte B, second G, third R, fourth A)
        */
-       uint32_t const * palette = (uint32_t *) rect->pict.data[1];
+       uint32_t const * palette = (uint32_t *) rect->data[1];
        /* And the stream has a map of those palette colours to colours
           chosen by the user; created a `mapped' palette from those settings.
        */
@@ -520,7 +520,7 @@ FFmpegDecoder::decode_bitmap_subtitle (AVSubtitleRect const * rect, ContentTimeP
                        /* XXX: this seems to be wrong to me (isn't the output image RGBA?) but it looks right on screen */
                        *out_line_p++ = (p.a << 24) | (p.r << 16) | (p.g << 8) | p.b;
                }
-               sub_p += rect->pict.linesize[0];
+               sub_p += rect->linesize[0];
                out_p += image->stride()[0] / sizeof (uint32_t);
        }
 
index 249fa7966e7307a202105bdda65668e643ca15aa..243e9e97e40764f798ab62f8f51dd8d0d52439cd 100644 (file)
@@ -30,7 +30,6 @@
 extern "C" {
 #include <libavfilter/avfiltergraph.h>
 #include <libavfilter/buffersrc.h>
-#include <libavfilter/avcodec.h>
 #include <libavfilter/buffersink.h>
 #include <libavformat/avio.h>
 }