summaryrefslogtreecommitdiffstats
path: root/common/tags.c
Commit message (Collapse)AuthorAgeFilesLines
* player: don't set tag strings to NULLwm42015-01-121-3/+3
| | | | | | | | | | | | | bstr is a bounded string type, consisting of a pointer and a length value. If the length is 0, the pointer can be NULL. This is somewhat logical due to how this abstraction works, but it can leak when converting to C strings. talloc_strndup() returns NULL instead of "" in this case, which broke some other code. Use bstrto0() instead, which is the "proper" function to convert bstr to char*. Fixes #1462.
* player: change --display-tags behaviorwm42015-01-121-7/+16
| | | | | | | | | | | | | | | | | | Remove the "all" special-behavior, and instead interpret trailing "*" characters. --display-tags=all is replaced by --display-tags=* as a special-case of the new behavior. See #1404. Note that the most straight-forward value for matchlen in the normal case would be INT_MAX, because it should be using the entire string. I used keylen+1 instead, because glibc seems to handle this case incorrectly: snprintf(buf, sizeof(buf), "%.*s", INT_MAX, "hello"); The result is empty, instead of just containing the string argument. This might be a glibc bug; it works with other libcs (even MinGW-w64).
* player: filter tags, add --display-tags optionwm42014-12-291-0/+19
| | | | | | | | This attempts to increase user-friendliness by excluding useless tags. It should be especially helpful with mp4 files, because the FFmpeg mp4 demuxer adds tons of completely useless information to the metadata. Fixes #1403.
* Move compat/ and bstr/ directory contents somewhere elsewm42014-08-291-1/+1
| | | | | | | | | bstr.c doesn't really deserve its own directory, and compat had just a few files, most of which may as well be in osdep. There isn't really any justification for these extra directories, so get rid of them. The compat/libav.h was empty - just delete it. We changed our approach to API compatibility, and will likely not need it anymore.
* tags: add copy functionwm42014-07-161-0/+13
|
* demux, stream: change metadata notificationwm42014-07-051-0/+6
| | | | | | | | | | | | (Again.) This time, we simply make it event-based, as it should be. This is done for both demuxer metadata and stream metadata. For some ogg-over-icy streams, 2 updates are reported on stream start. This is because libavformat reports an update right on start, while including the same info in the "static" metadata. I don't know if that's a bug or a feature.
* mp_tags: move generic mp_tags stuff into its own .c/.h files in common/Kevin Mitchell2014-04-131-0/+70
rename add_metadata to the more genera/descriptive mp_tags_copy_items_from_av_dictionary Signed-off-by: wm4 <wm4@nowhere>