[FFmpeg-cvslog] lavc/libvorbisdec: do not return empty frames.

Nicolas George git at videolan.org
Wed Sep 4 16:54:32 CEST 2013


ffmpeg | branch: master | Nicolas George <nicolas.george at normalesup.org> | Tue Sep  3 20:05:06 2013 +0200| [d7ccfe58e3a31d10286cb6ef1ab6cf5b7fa455fe] | committer: Nicolas George

lavc/libvorbisdec: do not return empty frames.

Some parts of the code have been known to react badly to
empty frames; they should not, but there is no need to
take risks.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d7ccfe58e3a31d10286cb6ef1ab6cf5b7fa455fe
---

 libavcodec/libvorbisdec.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/libvorbisdec.c b/libavcodec/libvorbisdec.c
index c4142cd..6822656 100644
--- a/libavcodec/libvorbisdec.c
+++ b/libavcodec/libvorbisdec.c
@@ -171,7 +171,7 @@ static int oggvorbis_decode_frame(AVCodecContext *avccontext, void *data,
     }
 
     frame->nb_samples = total_samples;
-    *got_frame_ptr   = 1;
+    *got_frame_ptr   = total_samples > 0;
     return avpkt->size;
 }
 



More information about the ffmpeg-cvslog mailing list