diff mbox

[FFmpeg-devel] lavc: Fix ticket 6024

Message ID 1481778350-5095-1-git-send-email-pkoshevoy@gmail.com
State Superseded
Headers show

Commit Message

Pavel Koshevoy Dec. 15, 2016, 5:05 a.m. UTC
From: Pavel Koshevoy <pkoshevoy@gmail.com>

---
 libavcodec/utils.c | 2 --
 1 file changed, 2 deletions(-)

Comments

wm4 Dec. 15, 2016, 4:57 p.m. UTC | #1
On Wed, 14 Dec 2016 22:05:50 -0700
pkoshevoy@gmail.com wrote:

> From: Pavel Koshevoy <pkoshevoy@gmail.com>
> 
> ---
>  libavcodec/utils.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/libavcodec/utils.c b/libavcodec/utils.c
> index 44ecc09..2ad96e4 100644
> --- a/libavcodec/utils.c
> +++ b/libavcodec/utils.c
> @@ -2788,8 +2788,6 @@ static int do_decode(AVCodecContext *avctx, AVPacket *pkt)
>      if (avctx->codec_type == AVMEDIA_TYPE_VIDEO) {
>          ret = avcodec_decode_video2(avctx, avctx->internal->buffer_frame,
>                                      &got_frame, pkt);
> -        if (ret >= 0)
> -            ret = pkt->size;
>      } else if (avctx->codec_type == AVMEDIA_TYPE_AUDIO) {
>          ret = avcodec_decode_audio4(avctx, avctx->internal->buffer_frame,
>                                      &got_frame, pkt);

This is not correct. 

Also your commit message/mail subject line contains absolutely no
information (unless you go out of your way to look at the issue, work
through all the verbose crap, and draw your own conclusion for what
this patch _might_ have been needed). Write an informative commit
message why this patch is needed and why this is the right fix for
whatever it fixes.
diff mbox

Patch

diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 44ecc09..2ad96e4 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -2788,8 +2788,6 @@  static int do_decode(AVCodecContext *avctx, AVPacket *pkt)
     if (avctx->codec_type == AVMEDIA_TYPE_VIDEO) {
         ret = avcodec_decode_video2(avctx, avctx->internal->buffer_frame,
                                     &got_frame, pkt);
-        if (ret >= 0)
-            ret = pkt->size;
     } else if (avctx->codec_type == AVMEDIA_TYPE_AUDIO) {
         ret = avcodec_decode_audio4(avctx, avctx->internal->buffer_frame,
                                     &got_frame, pkt);