omx: Don't return > 0 from omx_encode_frame
authorMartin Storsjö <martin@martin.st>
Thu, 23 Jun 2016 22:13:16 +0000 (01:13 +0300)
committerMichael Niedermayer <michael@niedermayer.cc>
Sat, 25 Jun 2016 19:39:17 +0000 (21:39 +0200)
The encode function is supposed to just return 0 on success.
This stems from a mixup with the return value of decode functions.

Reviewed-by: Jan Gerber <j@v2v.cc>
Signed-off-by: Martin Storsjö <martin@martin.st>
libavcodec/omx.c

index 9de9f8c..1b2ae0d 100644 (file)
@@ -845,7 +845,6 @@ static int omx_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
                 s->output_buf_size = 0;
             }
             if (buffer->nFlags & OMX_BUFFERFLAG_ENDOFFRAME) {
-                ret = pkt->size;
                 pkt->pts = av_rescale_q(from_omx_ticks(buffer->nTimeStamp), AV_TIME_BASE_Q, avctx->time_base);
                 // We don't currently enable B-frames for the encoders, so set
                 // pkt->dts = pkt->pts. (The calling code behaves worse if the encoder