]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/swfenc.c
Set channel layout for 4 and 5.1 channel cdata audio files
[ffmpeg] / libavformat / swfenc.c
index 052d7205e8f557a4180f406850ab7b82db323068..09c2d61f28a8ec222f69150bd765dabe78b180fb 100644 (file)
@@ -421,7 +421,7 @@ static int swf_write_video(AVFormatContext *s,
         put_swf_tag(s, TAG_STREAMBLOCK | TAG_LONG);
         avio_wl16(pb, swf->sound_samples);
         avio_wl16(pb, 0); // seek samples
-        av_fifo_generic_read(swf->audio_fifo, pb, frame_size, &avio_write);
+        av_fifo_generic_read(swf->audio_fifo, pb, frame_size, (void*)avio_write);
         put_swf_end_tag(s);
 
         /* update FIFO */
@@ -492,7 +492,7 @@ static int swf_write_trailer(AVFormatContext *s)
     avio_flush(s->pb);
 
     /* patch file size and number of frames if not streamed */
-    if (!url_is_streamed(s->pb) && video_enc) {
+    if (s->pb->seekable && video_enc) {
         file_size = avio_tell(pb);
         avio_seek(pb, 4, SEEK_SET);
         avio_wl32(pb, file_size);