This allows for simpler timestamp handling of decoded frames.
---
libavcodec/8svx.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavcodec/8svx.c b/libavcodec/8svx.c
index 328fc65..7b69e5f 100644
--- a/libavcodec/8svx.c
+++ b/libavcodec/8svx.c
@@ -95,7 +95,7 @@ static int eightsvx_decode_frame(AVCodecContext *avctx, void
*data,
int is_compr = (avctx->codec_id != AV_CODEC_ID_PCM_S8_PLANAR);
/* for the first packet, copy data to buffer */
- if (avpkt->data) {
+ if (esc->data_size == 0 && avpkt->data) {
int hdr_size = is_compr ? 2 : 0;
int chan_size = (avpkt->size - hdr_size * avctx->channels) /
avctx->channels;
@@ -167,7 +167,7 @@ static int eightsvx_decode_frame(AVCodecContext *avctx,
void *data,
*got_frame_ptr = 1;
*(AVFrame *)data = esc->frame;
- return avpkt->size;
+ return esc->data_idx >= esc->data_size ? avpkt->size : 0;
}
/** initialize 8svx decoder */
--
1.7.1
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel