[FFmpeg-devel] [PATCH] MMS wrapper

Geek.Song ffmpeg at gmail.com
Sun Jul 15 04:16:59 CEST 2012


On Sat, Jul 14, 2012 at 11:56 PM, Stefan Gehrer <stefan.gehrer at gmx.de> wrote:
> On 07/14/2012 01:49 PM, Geek.Song wrote:
>
>> On Sat, Jul 14, 2012 at 4:41 AM, Stefan Gehrer <stefan.gehrer at gmx.de>
>> wrote:
>>>
>>> attached patch implements a simple wrapper for handling mms:// URLs.
>>> It first tries to open using mmst protocol and on failure tries
>>> using mmsh protocol.
>>> I found some streams on tunein.com which either support only
>>> mmst or only mssh, with this patch applied both kinds can be
>>> played back with just specifying mms:// as protocol.
>>> This should fix ticket #998, the mms URL given there also works.
>>> mms://live1.wm.skynews.servecast.net/skynews_wmlz_live300k
>
>>
>> Dear:
>>
>> I think you over-design the implementation, I just modify the
>> avio_open2() to probe mmsh or mmst.
>>
>
> I am all ears for solutions with the least amount of code, so
> I formed your suggestion into a patch (with slight modifications)
> and attached. If in the future you post code to this list, and I
> hope you do, please also do so in patch form (unified diff, generated
> by diff -u).

your modifications are dangerous, you can not use |AVIOContext **s| in
av_log(*s,...) because it is uninitialized in this scenario.

I reformat my modification as attachment according to your suggestion.

>
> The disadvantage of your solution is that protocol-specific code is
> put into generic parts which may make it unacceptable, but that is
> not my decision.
>

Sure, my solution is just a hack with less code, not a good solution.

>
> P.S. please do not top-post, but instead put your reply at the bottom
> of the text you are replying to.

OK, thanks

-----------------------------------------------------------------------------------------
My key fingerprint: d1:03:f5:32:26:ff:d7:3c:e4:42:e3:51:ec:92:78:b2
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mms_swtich_2.diff
Type: application/octet-stream
Size: 1495 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120715/c07b9259/attachment.obj>


More information about the ffmpeg-devel mailing list