mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
wmall: fix seeking.
This commit is contained in:
parent
0a82f5275f
commit
d360dd902c
@ -903,6 +903,7 @@ static int decode_subframe(WmallDecodeCtx *s)
|
|||||||
} else if (!s->cdlms[0][0].order) {
|
} else if (!s->cdlms[0][0].order) {
|
||||||
av_log(s->avctx, AV_LOG_DEBUG,
|
av_log(s->avctx, AV_LOG_DEBUG,
|
||||||
"Waiting for seekable tile\n");
|
"Waiting for seekable tile\n");
|
||||||
|
s->frame.nb_samples = 0;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1265,6 +1266,17 @@ static int decode_packet(AVCodecContext *avctx, void *data, int *got_frame_ptr,
|
|||||||
return (s->packet_loss) ? AVERROR_INVALIDDATA : get_bits_count(gb) >> 3;
|
return (s->packet_loss) ? AVERROR_INVALIDDATA : get_bits_count(gb) >> 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void flush(AVCodecContext *avctx)
|
||||||
|
{
|
||||||
|
WmallDecodeCtx *s = avctx->priv_data;
|
||||||
|
s->packet_loss = 1;
|
||||||
|
s->packet_done = 0;
|
||||||
|
s->num_saved_bits = 0;
|
||||||
|
s->frame_offset = 0;
|
||||||
|
s->next_packet_start = 0;
|
||||||
|
s->cdlms[0][0].order = 0;
|
||||||
|
s->frame.nb_samples = 0;
|
||||||
|
}
|
||||||
|
|
||||||
AVCodec ff_wmalossless_decoder = {
|
AVCodec ff_wmalossless_decoder = {
|
||||||
.name = "wmalossless",
|
.name = "wmalossless",
|
||||||
@ -1273,6 +1285,7 @@ AVCodec ff_wmalossless_decoder = {
|
|||||||
.priv_data_size = sizeof(WmallDecodeCtx),
|
.priv_data_size = sizeof(WmallDecodeCtx),
|
||||||
.init = decode_init,
|
.init = decode_init,
|
||||||
.decode = decode_packet,
|
.decode = decode_packet,
|
||||||
|
.flush = flush,
|
||||||
.capabilities = CODEC_CAP_SUBFRAMES | CODEC_CAP_DR1 | CODEC_CAP_DELAY,
|
.capabilities = CODEC_CAP_SUBFRAMES | CODEC_CAP_DR1 | CODEC_CAP_DELAY,
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("Windows Media Audio Lossless"),
|
.long_name = NULL_IF_CONFIG_SMALL("Windows Media Audio Lossless"),
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user