diff options
author | Erkki Seppälä <erkki.seppala.ext@nokia.com> | 2016-08-23 12:03:20 +0300 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2016-08-23 13:07:30 +0200 |
commit | 9d5ea8de56fcdc77daa01cf0d413dfe6101de30a (patch) | |
tree | dd42ee9eb0f1999792a7e0e0775a39a59b5a3556 /libavformat/utils.c | |
parent | 77bf96b04710b98a52aaddb93bfd32da0d506191 (diff) | |
download | ffmpeg-9d5ea8de56fcdc77daa01cf0d413dfe6101de30a.tar.gz |
libavformat/utils: added ability to probe AVMEDIA_TYPE_DATA format
Now force_codec_ids supports AVMEDIA_TYPE_DATA and
avformat_query_codec accepts data codecs as well in addition to video,
audio and subtitle tracks.
Signed-off-by: Erkki Seppälä <erkki.seppala.ext@nokia.com>
Signed-off-by: OZOPlayer <OZOPL@nokia.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat/utils.c')
-rw-r--r-- | libavformat/utils.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c index dd9df9294a..d7f3c7a0b2 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -612,6 +612,10 @@ static void force_codec_ids(AVFormatContext *s, AVStream *st) if (s->subtitle_codec_id) st->codecpar->codec_id = s->subtitle_codec_id; break; + case AVMEDIA_TYPE_DATA: + if (s->data_codec_id) + st->codec->codec_id = s->data_codec_id; + break; } } @@ -4601,7 +4605,8 @@ int avformat_query_codec(const AVOutputFormat *ofmt, enum AVCodecID codec_id, return !!av_codec_get_tag2(ofmt->codec_tag, codec_id, &codec_tag); else if (codec_id == ofmt->video_codec || codec_id == ofmt->audio_codec || - codec_id == ofmt->subtitle_codec) + codec_id == ofmt->subtitle_codec || + codec_id == ofmt->data_codec) return 1; } return AVERROR_PATCHWELCOME; |