[MPlayer-dev-eng] [PATCH] Return actual current stream id in slave mode

Adrian Stutz adrian at sttz.ch
Sun Dec 27 13:21:29 CET 2009


On Wed, Dec 16, 2009 at 1:00 AM, Adrian Stutz <adrian at sttz.ch> wrote:
> On Tue, Dec 15, 2009 at 11:38 PM, Reimar Döffinger
> <Reimar.Doeffinger at gmx.de> wrote:
>> First, I think you have to check that mpctx->d_video (same for audio) is
>> not NULL,
>> I expect that can happen.
>
> I first checked if d_(audio|video) is NULL but then. after looking at
> demuxer.c and especially new_demuxer(). i came to the conclusion that the
> structs are always initliaized and their id set. I did test with audio files
> as well as with a video that has no audio stream and in neither case was
> either NULL.

Well, here's an updated patch checking against NULL as well.

Also, a second patch which prints an identify-style error for the
(get|set|step)_property commands, e.g. ANS_ERROR=UNAVAILABLE. That
makes it possible for front-ends to distinguish between cases when a
property is simply not available (has no streams in this case) or if
an actual error has occurred.

Greetings
Adrian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: property_get_actual_stream_id_v3.diff
Type: application/octet-stream
Size: 878 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20091227/a73397bf/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: slave_print_errors.diff
Type: application/octet-stream
Size: 1763 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20091227/a73397bf/attachment-0001.obj>


More information about the MPlayer-dev-eng mailing list