mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-24 08:12:44 +00:00
smush: set audio packet duration
Signed-off-by: Paul B Mahol <onemda@gmail.com>
This commit is contained in:
parent
1bb30d0295
commit
3821632e1b
@ -207,10 +207,15 @@ static int smush_read_packet(AVFormatContext *ctx, AVPacket *pkt)
|
|||||||
done = 1;
|
done = 1;
|
||||||
break;
|
break;
|
||||||
case MKBETAG('W', 'a', 'v', 'e'):
|
case MKBETAG('W', 'a', 'v', 'e'):
|
||||||
|
if (size < 13)
|
||||||
|
return AVERROR_INVALIDDATA;
|
||||||
if (av_get_packet(pb, pkt, size) < 0)
|
if (av_get_packet(pb, pkt, size) < 0)
|
||||||
return AVERROR(EIO);
|
return AVERROR(EIO);
|
||||||
|
|
||||||
pkt->stream_index = smush->audio_stream_index;
|
pkt->stream_index = smush->audio_stream_index;
|
||||||
|
pkt->duration = AV_RB32(pkt->data);
|
||||||
|
if (pkt->duration == 0xFFFFFFFFu)
|
||||||
|
pkt->duration = AV_RB32(pkt->data + 8);
|
||||||
done = 1;
|
done = 1;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
Loading…
Reference in New Issue
Block a user