mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-04-02 20:35:37 +02:00
Merge commit '0b5af5cf1224add1769b1094b9924ecf10de3d7d'
* commit '0b5af5cf1224add1769b1094b9924ecf10de3d7d': mov: Refactor multiple stsd skipping in mov_mov_skip_multiple_stsd Conflicts: libavformat/mov.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
commit
b32a6da100
@ -1558,6 +1558,30 @@ static int mov_finalize_stsd_codec(MOVContext *c, AVIOContext *pb,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int mov_skip_multiple_stsd(MOVContext *c, AVIOContext *pb,
|
||||||
|
int codec_tag, int format,
|
||||||
|
int size)
|
||||||
|
{
|
||||||
|
int video_codec_id = ff_codec_get_id(ff_codec_movvideo_tags, format);
|
||||||
|
|
||||||
|
if (codec_tag &&
|
||||||
|
(codec_tag != format &&
|
||||||
|
(c->fc->video_codec_id ? video_codec_id != c->fc->video_codec_id
|
||||||
|
: codec_tag != MKTAG('j','p','e','g')))) {
|
||||||
|
/* Multiple fourcc, we skip JPEG. This is not correct, we should
|
||||||
|
* export it as a separate AVStream but this needs a few changes
|
||||||
|
* in the MOV demuxer, patch welcome. */
|
||||||
|
|
||||||
|
av_log(c->fc, AV_LOG_WARNING, "multiple fourcc not supported\n");
|
||||||
|
avio_skip(pb, size);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
if (codec_tag == AV_RL32("avc1"))
|
||||||
|
av_log(c->fc, AV_LOG_WARNING, "Concatenated H.264 might not play corrently.\n");
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
int ff_mov_read_stsd_entries(MOVContext *c, AVIOContext *pb, int entries)
|
int ff_mov_read_stsd_entries(MOVContext *c, AVIOContext *pb, int entries)
|
||||||
{
|
{
|
||||||
AVStream *st;
|
AVStream *st;
|
||||||
@ -1589,21 +1613,10 @@ int ff_mov_read_stsd_entries(MOVContext *c, AVIOContext *pb, int entries)
|
|||||||
return AVERROR_INVALIDDATA;
|
return AVERROR_INVALIDDATA;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (st->codec->codec_tag &&
|
if (mov_skip_multiple_stsd(c, pb, st->codec->codec_tag, format,
|
||||||
st->codec->codec_tag != format &&
|
size - (avio_tell(pb) - start_pos)))
|
||||||
(c->fc->video_codec_id ? ff_codec_get_id(ff_codec_movvideo_tags, format) != c->fc->video_codec_id
|
|
||||||
: st->codec->codec_tag != MKTAG('j','p','e','g'))
|
|
||||||
){
|
|
||||||
/* Multiple fourcc, we skip JPEG. This is not correct, we should
|
|
||||||
* export it as a separate AVStream but this needs a few changes
|
|
||||||
* in the MOV demuxer, patch welcome. */
|
|
||||||
av_log(c->fc, AV_LOG_WARNING, "multiple fourcc not supported\n");
|
|
||||||
avio_skip(pb, size - (avio_tell(pb) - start_pos));
|
|
||||||
continue;
|
continue;
|
||||||
}
|
|
||||||
/* we cannot demux concatenated h264 streams because of different extradata */
|
|
||||||
if (st->codec->codec_tag && st->codec->codec_tag == AV_RL32("avc1"))
|
|
||||||
av_log(c->fc, AV_LOG_WARNING, "Concatenated H.264 might not play corrently.\n");
|
|
||||||
sc->pseudo_stream_id = st->codec->codec_tag ? -1 : pseudo_stream_id;
|
sc->pseudo_stream_id = st->codec->codec_tag ? -1 : pseudo_stream_id;
|
||||||
sc->dref_id= dref_id;
|
sc->dref_id= dref_id;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user