---
 libavformat/avformat.h |    4 +---
 libavformat/img2.c     |    2 ++
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index e77e90c..6a53192 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -233,9 +233,7 @@ typedef struct AVFormatParameters {
     attribute_deprecated int channels;
     attribute_deprecated int width;
     attribute_deprecated int height;
-#endif
-    enum PixelFormat pix_fmt;
-#if FF_API_FORMAT_PARAMETERS
+    attribute_deprecated enum PixelFormat pix_fmt;
     attribute_deprecated int channel; /**< Used to select DV channel. */
     attribute_deprecated const char *standard; /**< deprecated, use 
demuxer-specific options instead. */
     attribute_deprecated unsigned int mpeg2ts_raw:1;  /**< deprecated, use 
mpegtsraw demuxer */
diff --git a/libavformat/img2.c b/libavformat/img2.c
index 77d7c65..63b2b83 100644
--- a/libavformat/img2.c
+++ b/libavformat/img2.c
@@ -254,8 +254,10 @@ static int read_header(AVFormatContext *s1, 
AVFormatParameters *ap)
         st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
         st->codec->codec_id = av_str2id(img_tags, s->path);
     }
+#if FF_API_FORMAT_PARAMETERS
     if(st->codec->codec_type == AVMEDIA_TYPE_VIDEO && ap->pix_fmt != 
PIX_FMT_NONE)
         st->codec->pix_fmt = ap->pix_fmt;
+#endif
 
     return 0;
 }
-- 
1.7.5.1

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to