[FFmpeg-cvslog] movenc: Don't add base_data_offset in tfhd for PIFF files

Jeremy Hinegardner git at videolan.org
Fri May 17 10:49:28 CEST 2013


ffmpeg | branch: master | Jeremy Hinegardner <jeremy at copiousfreetime.org> | Sat Mar 23 23:15:31 2013 -0600| [40bbbce7e8ada7eea9674efb45252c916724246f] | committer: Martin Storsjö

movenc: Don't add base_data_offset in tfhd for PIFF files

According to the PIFF specification[1] the base_data_offset field MUST be
omitteed. See section 5.2.17. Since the ISMV files created by libavformat
state that they are 'piff' compatible via 'ftyp' box, this needs to be
corrected.

[1] http://www.iis.net/learn/media/smooth-streaming/protected-interoperable-file-format

Signed-off-by: Martin Storsjö <martin at martin.st>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=40bbbce7e8ada7eea9674efb45252c916724246f
---

 libavformat/movenc.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index 496158c..4ed99b7 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -2189,9 +2189,11 @@ static int mov_write_tfhd_tag(AVIOContext *pb, MOVTrack *track,
 
     /* Don't set a default sample size, the silverlight player refuses
      * to play files with that set. Don't set a default sample duration,
-     * WMP freaks out if it is set. */
+     * WMP freaks out if it is set. Don't set a base data offset, PIFF
+     * file format says it MUST NOT be set. */
     if (track->mode == MODE_ISM)
-        flags &= ~(MOV_TFHD_DEFAULT_SIZE | MOV_TFHD_DEFAULT_DURATION);
+        flags &= ~(MOV_TFHD_DEFAULT_SIZE | MOV_TFHD_DEFAULT_DURATION |
+                   MOV_TFHD_BASE_DATA_OFFSET);
 
     avio_wb32(pb, 0); /* size placeholder */
     ffio_wfourcc(pb, "tfhd");



More information about the ffmpeg-cvslog mailing list