summaryrefslogtreecommitdiff
path: root/chromium/third_party/ffmpeg/libavcodec/mediacodecdec_common.c
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/ffmpeg/libavcodec/mediacodecdec_common.c')
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/mediacodecdec_common.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/chromium/third_party/ffmpeg/libavcodec/mediacodecdec_common.c b/chromium/third_party/ffmpeg/libavcodec/mediacodecdec_common.c
index 7c2661f6726..1656cd66645 100644
--- a/chromium/third_party/ffmpeg/libavcodec/mediacodecdec_common.c
+++ b/chromium/third_party/ffmpeg/libavcodec/mediacodecdec_common.c
@@ -631,21 +631,21 @@ int ff_mediacodec_dec_send(AVCodecContext *avctx, MediaCodecDecContext *s,
"Queued input buffer %zd size=%zd ts=%"PRIi64"\n", index, size, pts);
s->draining = 1;
- break;
- } else {
- size = FFMIN(pkt->size - offset, size);
- memcpy(data, pkt->data + offset, size);
- offset += size;
+ return 0;
+ }
- status = ff_AMediaCodec_queueInputBuffer(codec, index, 0, size, pts, 0);
- if (status < 0) {
- av_log(avctx, AV_LOG_ERROR, "Failed to queue input buffer (status = %d)\n", status);
- return AVERROR_EXTERNAL;
- }
+ size = FFMIN(pkt->size - offset, size);
+ memcpy(data, pkt->data + offset, size);
+ offset += size;
- av_log(avctx, AV_LOG_TRACE,
- "Queued input buffer %zd size=%zd ts=%"PRIi64"\n", index, size, pts);
+ status = ff_AMediaCodec_queueInputBuffer(codec, index, 0, size, pts, 0);
+ if (status < 0) {
+ av_log(avctx, AV_LOG_ERROR, "Failed to queue input buffer (status = %d)\n", status);
+ return AVERROR_EXTERNAL;
}
+
+ av_log(avctx, AV_LOG_TRACE,
+ "Queued input buffer %zd size=%zd ts=%"PRIi64"\n", index, size, pts);
}
if (offset == 0)