[MPlayer-cvslog] r36624 - trunk/libmpdemux/demux_rawdv.c

reimar subversion at mplayerhq.hu
Sun Jan 19 12:13:01 CET 2014


Author: reimar
Date: Sun Jan 19 12:13:01 2014
New Revision: 36624

Log:
rawdv: Fix memory leak in error case.

Modified:
   trunk/libmpdemux/demux_rawdv.c

Modified: trunk/libmpdemux/demux_rawdv.c
==============================================================================
--- trunk/libmpdemux/demux_rawdv.c	Sun Jan 19 11:53:03 2014	(r36623)
+++ trunk/libmpdemux/demux_rawdv.c	Sun Jan 19 12:13:01 2014	(r36624)
@@ -121,8 +121,10 @@ static int demux_rawdv_fill_buffer(demux
 
    dp_video=new_demux_packet(frames->frame_size);
    bytes_read=stream_read(demuxer->stream,dp_video->buffer,frames->frame_size);
-   if (bytes_read<frames->frame_size)
+   if (bytes_read<frames->frame_size) {
+      free_demux_packet(dp_video);
       return 0;
+   }
    dp_video->pts=frames->current_frame/sh_video->fps;
    dp_video->pos=frames->current_filepos;
    dp_video->flags=0;


More information about the MPlayer-cvslog mailing list