Commit d90f91c1 authored by Carl Eugen Hoyos's avatar Carl Eugen Hoyos

lavf/mxfenc: Write correct interlaced flag when muxing dnxhd.

Reported and early patch version tested by forum user gridtank.
Reviewed-by: Tomas Härdin
parent 5d309d30
...@@ -1102,6 +1102,14 @@ int avpriv_dnxhd_get_frame_size(int cid) ...@@ -1102,6 +1102,14 @@ int avpriv_dnxhd_get_frame_size(int cid)
return ff_dnxhd_cid_table[i].frame_size; return ff_dnxhd_cid_table[i].frame_size;
} }
int avpriv_dnxhd_get_interlaced(int cid)
{
int i = ff_dnxhd_get_cid_table(cid);
if (i < 0)
return i;
return ff_dnxhd_cid_table[i].interlaced;
}
int ff_dnxhd_find_cid(AVCodecContext *avctx, int bit_depth) int ff_dnxhd_find_cid(AVCodecContext *avctx, int bit_depth)
{ {
int i, j; int i, j;
......
...@@ -53,5 +53,6 @@ int ff_dnxhd_find_cid(AVCodecContext *avctx, int bit_depth); ...@@ -53,5 +53,6 @@ int ff_dnxhd_find_cid(AVCodecContext *avctx, int bit_depth);
void ff_dnxhd_print_profiles(AVCodecContext *avctx, int loglevel); void ff_dnxhd_print_profiles(AVCodecContext *avctx, int loglevel);
int avpriv_dnxhd_get_frame_size(int cid); int avpriv_dnxhd_get_frame_size(int cid);
int avpriv_dnxhd_get_interlaced(int cid);
#endif /* AVCODEC_DNXHDDATA_H */ #endif /* AVCODEC_DNXHDDATA_H */
...@@ -29,8 +29,8 @@ ...@@ -29,8 +29,8 @@
#include "libavutil/version.h" #include "libavutil/version.h"
#define LIBAVCODEC_VERSION_MAJOR 56 #define LIBAVCODEC_VERSION_MAJOR 56
#define LIBAVCODEC_VERSION_MINOR 35 #define LIBAVCODEC_VERSION_MINOR 36
#define LIBAVCODEC_VERSION_MICRO 101 #define LIBAVCODEC_VERSION_MICRO 100
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \ #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
LIBAVCODEC_VERSION_MINOR, \ LIBAVCODEC_VERSION_MINOR, \
......
...@@ -1640,6 +1640,8 @@ AVPacket *pkt) ...@@ -1640,6 +1640,8 @@ AVPacket *pkt)
if ((frame_size = avpriv_dnxhd_get_frame_size(cid)) < 0) if ((frame_size = avpriv_dnxhd_get_frame_size(cid)) < 0)
return -1; return -1;
if ((sc->interlaced = avpriv_dnxhd_get_interlaced(cid)) < 0)
return AVERROR_INVALIDDATA;
switch (cid) { switch (cid) {
case 1235: case 1235:
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
#define LIBAVFORMAT_VERSION_MAJOR 56 #define LIBAVFORMAT_VERSION_MAJOR 56
#define LIBAVFORMAT_VERSION_MINOR 31 #define LIBAVFORMAT_VERSION_MINOR 31
#define LIBAVFORMAT_VERSION_MICRO 100 #define LIBAVFORMAT_VERSION_MICRO 101
#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \ #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
LIBAVFORMAT_VERSION_MINOR, \ LIBAVFORMAT_VERSION_MINOR, \
......
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