diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-10-18 01:33:09 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-10-18 01:54:40 +0200 |
commit | fae714a9fbff876c4cacfe7d437c940d557b44ce (patch) | |
tree | a902e7f012153f96582d2eecdfb78def1c0260a1 /libavformat/mov.c | |
parent | 9be937d38dac1ccf16fa8a7c0f9098bad5bb0431 (diff) | |
parent | 3ec344626c4ec2f515169f89bffe95dea92a5982 (diff) | |
download | ffmpeg-fae714a9fbff876c4cacfe7d437c940d557b44ce.tar.gz |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
avconv: add presets
rtsp: Expose the flag options via private AVOptions for sdp and rtp, too
rtsp: Make the rtsp flags avoptions set via a define
rtpenc: Set a default video codec
avoptions: Fix av_opt_flag_is_set
rtp: Fix ff_rtp_get_payload_type
doc: Update the documentation on setting options for RTSP
rtsp: Remove the separate filter_source variable
rtsp: Accept options via private avoptions instead of URL options
rtsp: Simplify AVOption definitions
rtsp: Merge the AVOption lists
lavfi: port libmpcodecs delogo filter
lavfi: port boxblur filter from libmpcodecs
lavfi: add negate filter
lavfi: add LUT (LookUp Table) generic filters
AVOptions: don't segfault on NULL parameter in av_set_options_string()
avio: Check for invalid buffer length.
mpegenc/mpegtsenc: add muxrate private options.
lavf: deprecate AVFormatContext.file_size
mov: add support for TV metadata atoms tves, tvsn and stik
Conflicts:
Changelog
doc/filters.texi
doc/protocols.texi
libavfilter/Makefile
libavfilter/allfilters.c
libavfilter/avfilter.h
libavfilter/formats.c
libavfilter/internal.h
libavfilter/vf_boxblur.c
libavfilter/vf_delogo.c
libavfilter/vf_lut.c
libavformat/mpegtsenc.c
libavformat/utils.c
libavformat/version.h
libavutil/opt.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/mov.c')
-rw-r--r-- | libavformat/mov.c | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c index 936ec18570..3bbfd26313 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -99,6 +99,33 @@ static int mov_metadata_track_or_disc_number(MOVContext *c, AVIOContext *pb, return 0; } +static int mov_metadata_int8(MOVContext *c, AVIOContext *pb, + unsigned len, const char *key) +{ + char buf[16]; + + /* bypass padding bytes */ + avio_r8(pb); + avio_r8(pb); + avio_r8(pb); + + snprintf(buf, sizeof(buf), "%hu", avio_r8(pb)); + av_dict_set(&c->fc->metadata, key, buf, 0); + + return 0; +} + +static int mov_metadata_stik(MOVContext *c, AVIOContext *pb, + unsigned len, const char *key) +{ + char buf[16]; + + snprintf(buf, sizeof(buf), "%hu", avio_r8(pb)); + av_dict_set(&c->fc->metadata, key, buf, 0); + + return 0; +} + static const uint32_t mac_to_unicode[128] = { 0x00C4,0x00C5,0x00C7,0x00C9,0x00D1,0x00D6,0x00DC,0x00E1, 0x00E0,0x00E2,0x00E4,0x00E3,0x00E5,0x00E7,0x00E9,0x00E8, @@ -174,6 +201,12 @@ static int mov_read_udta_string(MOVContext *c, AVIOContext *pb, MOVAtom atom) parse = mov_metadata_track_or_disc_number; break; case MKTAG( 'd','i','s','k'): key = "disc"; parse = mov_metadata_track_or_disc_number; break; + case MKTAG( 't','v','e','s'): key = "episode_sort"; + parse = mov_metadata_int8; break; + case MKTAG( 't','v','s','n'): key = "season_number"; + parse = mov_metadata_int8; break; + case MKTAG( 's','t','i','k'): key = "media_type"; + parse = mov_metadata_stik; break; } if (c->itunes_metadata && atom.size > 8) { |