]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/wtvdec.c
Fix packet_buffer memory leak in avformat_free_context
[ffmpeg] / libavformat / wtvdec.c
index cfdc55523a806ac10ea73ccd0592a3ca28e6ab0c..c70057ce27995ac82bdf5c8b13d6aaac79a7891d 100644 (file)
@@ -76,7 +76,7 @@ static int wtvfile_read_packet(void *opaque, uint8_t *buf, int buf_size)
 
     if (wf->error || pb->error)
         return -1;
-    if (wf->position >= wf->length || url_feof(pb))
+    if (wf->position >= wf->length || avio_feof(pb))
         return 0;
 
     buf_size = FFMIN(buf_size, wf->length - wf->position);
@@ -533,7 +533,7 @@ static void parse_legacy_attrib(AVFormatContext *s, AVIOContext *pb)
 {
     ff_asf_guid guid;
     int length, type;
-    while(!url_feof(pb)) {
+    while(!avio_feof(pb)) {
         char key[1024];
         ff_get_guid(pb, &guid);
         type   = avio_rl32(pb);
@@ -761,7 +761,7 @@ static int parse_chunks(AVFormatContext *s, int mode, int64_t seekts, int *len_p
 {
     WtvContext *wtv = s->priv_data;
     AVIOContext *pb = wtv->pb;
-    while (!url_feof(pb)) {
+    while (!avio_feof(pb)) {
         ff_asf_guid g;
         int len, sid, consumed;
 
@@ -981,7 +981,7 @@ static int read_header(AVFormatContext *s)
             while(1) {
                 uint64_t timestamp = avio_rl64(pb);
                 uint64_t frame_nb  = avio_rl64(pb);
-                if (url_feof(pb))
+                if (avio_feof(pb))
                     break;
                 ff_add_index_entry(&wtv->index_entries, &wtv->nb_index_entries, &wtv->index_entries_allocated_size,
                                    0, timestamp, frame_nb, 0, AVINDEX_KEYFRAME);
@@ -995,7 +995,7 @@ static int read_header(AVFormatContext *s)
                     while (1) {
                         uint64_t frame_nb = avio_rl64(pb);
                         uint64_t position = avio_rl64(pb);
-                        if (url_feof(pb))
+                        if (avio_feof(pb))
                             break;
                         for (i = wtv->nb_index_entries - 1; i >= 0; i--) {
                             AVIndexEntry *e = wtv->index_entries + i;