]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/asfenc.c
vf_hwmap: Properly free a locally derived device
[ffmpeg] / libavformat / asfenc.c
index 029ccad1d675e70541c6306e04c4bd1c7654cc9c..a40c02d00d2a0f5001d3756aebc30cc59dd4ee96 100644 (file)
@@ -192,7 +192,6 @@ typedef struct ASFStream {
     AVPacket pkt;
     int frag_offset;
     int timestamp;
-    int64_t duration;
 
     int ds_span;                /* descrambling  */
     int ds_packet_size;
@@ -210,7 +209,7 @@ typedef struct ASFContext {
     uint32_t seqno;
     int is_streamed;
     ASFStream streams[128];              ///< it's max number and it's not that big
-    /* non streamed additonnal info */
+    /* non-streamed additional info */
     uint64_t nb_packets;                 ///< how many packets are there in the file, invalid if broadcasting
     uint64_t duration;                   ///< in ms
     /* packet filling */
@@ -434,7 +433,7 @@ static int asf_write_header1(AVFormatContext *s, int64_t file_size,
     avio_wl64(pb, play_duration); /* end time stamp (in 100ns units) */
     avio_wl64(pb, send_duration); /* duration (in 100ns units) */
     avio_wl64(pb, PREROLL_TIME); /* start time stamp */
-    avio_wl32(pb, (asf->is_streamed || !pb->seekable) ? 3 : 2);  /* ??? */
+    avio_wl32(pb, (asf->is_streamed || !(pb->seekable & AVIO_SEEKABLE_NORMAL)) ? 3 : 2);  /* ??? */
     avio_wl32(pb, s->packet_size); /* packet size */
     avio_wl32(pb, s->packet_size); /* packet size */
     avio_wl32(pb, bit_rate); /* Nominal data rate in bps */
@@ -447,7 +446,7 @@ static int asf_write_header1(AVFormatContext *s, int64_t file_size,
     avio_wl16(pb, 0);
     end_header(pb, hpos);
 
-    /* title and other infos */
+    /* title and other info */
     if (has_title) {
         int len;
         uint8_t *buf;
@@ -955,7 +954,7 @@ static int asf_write_trailer(AVFormatContext *s)
         asf_write_index(s, asf->index_ptr, asf->maximum_packet, asf->nb_index_count);
     avio_flush(s->pb);
 
-    if (asf->is_streamed || !s->pb->seekable) {
+    if (asf->is_streamed || !(s->pb->seekable & AVIO_SEEKABLE_NORMAL)) {
         put_chunk(s, 0x4524, 0, 0); /* end of stream */
     } else {
         /* rewrite an updated header */