summaryrefslogtreecommitdiffstats
path: root/demux
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-09-24 17:27:19 +0200
committerwm4 <wm4@nowhere>2016-09-24 17:51:23 +0200
commit68d2903cb1f3095070636ebb9e696594cc71f6c4 (patch)
treeee6c7f959714c6608bf715dbbe345888e3c2988d /demux
parente2e9a7faa85af96a3b0ba8369fc221fe18c4ca49 (diff)
downloadmpv-68d2903cb1f3095070636ebb9e696594cc71f6c4.tar.bz2
mpv-68d2903cb1f3095070636ebb9e696594cc71f6c4.tar.xz
command: some minor corrections to previous commit
The last commit was fine - just making some enhancements. Rename the function to parse_node_chapters(), since it really has not much to do with Lua. Don't use len<0 as check whether it makes sense to set chapters, and instead check for mpctx->demuxer (that includes the possibility to set chapters e.g. within a preload hook, but after chapters are initialized from the demuxer). Return M_PROPERTY_ERROR instead of M_PROPERTY_OK if the mpv_node has the wrong type. It's ok if a chapter has no title, so change the checks accordingly. Remove a Yoda condition. Notify that chapter metadata might have changed with mp_notify() (the chapter list itself is already taken care by generic code). Fix leaking the metadata allocations of the new chapter list.
Diffstat (limited to 'demux')
0 files changed, 0 insertions, 0 deletions