]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/mmf.c
Merge remote branch 'qatar/master'
[ffmpeg] / libavformat / mmf.c
index be3f649b41061b42d754995e9a799edc699ee5ec..fc6fcc3caa40968ac099862813ea36e3accc6736 100644 (file)
@@ -102,7 +102,7 @@ static int mmf_write_header(AVFormatContext *s)
 
     av_set_pts_info(s->streams[0], 64, 1, s->streams[0]->codec->sample_rate);
 
-    put_flush_packet(pb);
+    avio_flush(pb);
 
     return 0;
 }
@@ -133,7 +133,7 @@ static int mmf_write_trailer(AVFormatContext *s)
     int64_t pos, size;
     int gatetime;
 
-    if (!url_is_streamed(s->pb)) {
+    if (s->pb->seekable) {
         /* Fill in length fields */
         end_tag_be(pb, mmf->awapos);
         end_tag_be(pb, mmf->atrpos);
@@ -160,7 +160,7 @@ static int mmf_write_trailer(AVFormatContext *s)
 
         avio_seek(pb, pos, SEEK_SET);
 
-        put_flush_packet(pb);
+        avio_flush(pb);
     }
     return 0;
 }
@@ -195,7 +195,7 @@ static int mmf_read_header(AVFormatContext *s,
     file_size = avio_rb32(pb);
 
     /* Skip some unused chunks that may or may not be present */
-    for(;; avio_seek(pb, size, SEEK_CUR)) {
+    for(;; avio_skip(pb, size)) {
         tag = avio_rl32(pb);
         size = avio_rb32(pb);
         if(tag == MKTAG('C','N','T','I')) continue;
@@ -226,7 +226,7 @@ static int mmf_read_header(AVFormatContext *s,
     avio_r8(pb); /* time base g */
 
     /* Skip some unused chunks that may or may not be present */
-    for(;; avio_seek(pb, size, SEEK_CUR)) {
+    for(;; avio_skip(pb, size)) {
         tag = avio_rl32(pb);
         size = avio_rb32(pb);
         if(tag == MKTAG('A','t','s','q')) continue;
@@ -266,7 +266,7 @@ static int mmf_read_packet(AVFormatContext *s,
     AVStream *st;
     int ret, size;
 
-    if (s->pb->eof_reached)
+    if (url_feof(s->pb))
         return AVERROR(EIO);
     st = s->streams[0];