This allows for simpler timestamp handling of decoded frames.
---
 libavcodec/apedec.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/libavcodec/apedec.c b/libavcodec/apedec.c
index 5917903..f44efe7 100644
--- a/libavcodec/apedec.c
+++ b/libavcodec/apedec.c
@@ -832,7 +832,6 @@ static int ape_decode_frame(AVCodecContext *avctx, void 
*data,
     int32_t *sample24;
     int i, ret;
     int blockstodecode;
-    int bytes_used = 0;
 
     /* this should never be negative, but bad things will happen if it is, so
        check it just to make sure. */
@@ -887,8 +886,6 @@ static int ape_decode_frame(AVCodecContext *avctx, void 
*data,
             av_log(avctx, AV_LOG_ERROR, "Error reading frame header\n");
             return AVERROR_INVALIDDATA;
         }
-
-        bytes_used = avpkt->size;
     }
 
     if (!s->data) {
@@ -960,7 +957,7 @@ static int ape_decode_frame(AVCodecContext *avctx, void 
*data,
     *got_frame_ptr   = 1;
     *(AVFrame *)data = s->frame;
 
-    return bytes_used;
+    return !s->samples ? avpkt->size : 0;
 }
 
 static void ape_flush(AVCodecContext *avctx)
-- 
1.7.1

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to