]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/soxenc.c
Merge commit '9446d75941d639f19cfa9ae007eb4c5ca041f200'
[ffmpeg] / libavformat / soxenc.c
index 214acdd59bc7f00f9f523593bc43e2eec5f85b01..a07a2068c3925c09e82eea5ef99b277821db5c43 100644 (file)
@@ -30,6 +30,7 @@
  */
 
 #include "libavutil/intreadwrite.h"
+#include "libavutil/dict.h"
 #include "avformat.h"
 #include "avio_internal.h"
 #include "sox.h"
@@ -43,10 +44,10 @@ static int sox_write_header(AVFormatContext *s)
     SoXContext *sox = s->priv_data;
     AVIOContext *pb = s->pb;
     AVCodecContext *enc = s->streams[0]->codec;
-    AVMetadataTag *comment;
+    AVDictionaryEntry *comment;
     size_t comment_len = 0, comment_size;
 
-    comment = av_metadata_get(s->metadata, "comment", NULL, 0);
+    comment = av_dict_get(s->metadata, "comment", NULL, 0);
     if (comment)
         comment_len = strlen(comment->value);
     comment_size = (comment_len + 7) & ~7;
@@ -96,7 +97,7 @@ static int sox_write_trailer(AVFormatContext *s)
     AVIOContext *pb = s->pb;
     AVCodecContext *enc = s->streams[0]->codec;
 
-    if (!url_is_streamed(s->pb)) {
+    if (s->pb->seekable) {
         /* update number of samples */
         int64_t file_size = avio_tell(pb);
         int64_t num_samples = (file_size - sox->header_size - 4LL) >> 2LL;