Browse Source

Use new packet reading API, fixes a memory leak.
patch by Zdenek Kabelac, zdenek.kabelac gmail com

Originally committed as revision 18728 to svn://svn.ffmpeg.org/ffmpeg/trunk

Zdenek Kabelac 16 years ago
parent
commit
92147b6bec
1 changed files with 3 additions and 0 deletions
  1. 3 0
      tools/pktdumper.c

+ 3 - 0
tools/pktdumper.c

@@ -107,11 +107,14 @@ int main(int argc, char **argv)
             write(fd, pkt.data, pkt.size);
             write(fd, pkt.data, pkt.size);
             close(fd);
             close(fd);
         }
         }
+        av_free_packet(&pkt);
         pktnum++;
         pktnum++;
         if (maxpkts && (pktnum >= maxpkts))
         if (maxpkts && (pktnum >= maxpkts))
             break;
             break;
     }
     }
 
 
+    av_close_input_file(fctx);
+
     while (donotquit)
     while (donotquit)
         sleep(60);
         sleep(60);