[FFmpeg-devel] [PATCH] Move av_open_input_file probe loop to its own method
Michael Niedermayer
michaelni
Sun Mar 7 23:34:13 CET 2010
On Sun, Mar 07, 2010 at 12:48:45PM -0500, MIcah Galizia wrote:
> On 10-03-07 05:52 AM, Stefano Sabatini wrote:
>> On date Saturday 2010-03-06 19:02:07 -0500, Micah F. Galizia encoded:
>>> On 10-03-06 06:17 PM, Michael Niedermayer wrote:
>>>> On Sat, Mar 06, 2010 at 03:34:27PM -0500, Micah F. Galizia wrote:
>>>>> On 10-03-06 03:21 PM, Stefano Sabatini wrote:
>>>>>> On date Saturday 2010-03-06 14:58:38 -0500, Micah F. Galizia encoded:
>>>>>>> On 10-03-05 06:44 AM, Michael Niedermayer wrote:
>>>>>>>> On Thu, Mar 04, 2010 at 10:23:57PM -0500, Micah F. Galizia wrote:
>>>>>> [...]
>>>>>>> Index: libavformat/internal.h
>>>>>>> ===================================================================
>>>>>>> --- libavformat/internal.h (revision 22246)
>>>>>>> +++ libavformat/internal.h (working copy)
>>>>>>> @@ -35,4 +35,19 @@
>>>>>>> void ff_interleave_add_packet(AVFormatContext *s, AVPacket *pkt,
>>>>>>> int (*compare)(AVFormatContext *,
>>>>>>> AVPacket *, AVPacket *));
>>>>>>>
>>>>>>> +/**
>>>>>>> + * Probe a Bytestream to determine the input format.
>>>>>>
>>>>>> Nits: "Probes a bytestream..."
>>>>>>
>>>>>>> + *
>>>>>>> + * @param pb The bytestream to probe. It may be closed and opened
>>>>>>> again.
>>>>>>
>>>>>>> + * @param fmt The input format is put here.
>>>>>>> + * @param filename The filename of the stream.
>>>>>>> + * @param logctx The log context
>>>>>>> + * @param offset The offset within the bytestream to probe from.
>>>>>>> + * @param max_probe_size The maximum probe buffer size.
>>>>>>
>>>>>> These should not be Upcased (as they are non-complete sentences), also
>>>>>> skip the "." at the end.
>>>>>>
>>>>>>> + * @return 0 if OK, AVERROR_xxx otherwise
>>>>>>> + */
>>>>>>> +int ff_probe_input_buffer(ByteIOContext **pb, AVInputFormat **fmt,
>>>>>>> + const char *filename, void *logctx,
>>>>>>> + unsigned int offset, unsigned int
>>>>>>> max_probe_size);
>>>>>>> +
>>>>>>> #endif /* AVFORMAT_INTERNAL_H */
>>>>>>
>>>>>> Regards.
>>>>>
>>>>> CAPS and grammar fixed.
>>>>> --
>>>>> Micah F. Galizia
>>>>> micahgalizia at gmail.com
>>>>>
>>>>> "The mark of an immature man is that he wants to die nobly for a cause,
>>>>> while the mark of the mature man is that he wants to live humbly for
>>>>> one."
>>>>> --W. Stekel
>>>>
>>>>> internal.h | 15 +++++++++
>>>>> utils.c | 94
>>>>> ++++++++++++++++++++++++++++++++++++++++---------------------
>>>>> 2 files changed, 78 insertions(+), 31 deletions(-)
>>>>> 80fd4dbd733ca2e9978ece01d1103fe9a7a60588 probe_buffer3.diff
>>>>
>>>> should be ok if tested
>>>
>>> I tested it in plain old ffmpeg, and with my shoutcast changes.
>>
>> Please test with make test, I tried it and it failed in
>> regtest-pbmpipe.
>>
>> cat pbmpipe.lavf.err
>> /home/stefano/src/ffmpeg.git/./tests/data/lavf/pbmpipe.pbm: Error while
>> opening file
>
> Thank you. The attached patch fixes it. The problem was that after the
> initial probe in av_open_input_file (with no actual probe data), I was
> setting the input format to NULL in ff_probe_input_buffer. Now all
> regression tests pass (make test).
>
> Also, I have improved the commenting in internal.h.
>
> Thanks again!
> --
> Micah F. Galizia
> micahgalizia at gmail.com
>
> "The mark of an immature man is that he wants to die nobly for a cause,
> while the mark of the mature man is that he wants to live humbly for one."
> --W. Stekel
> internal.h | 18 +++++++++++
> utils.c | 93 ++++++++++++++++++++++++++++++++++++++++---------------------
> 2 files changed, 80 insertions(+), 31 deletions(-)
> 29a2cd380cede2f7eaae59738d5fb1cf02ec7458 probe_buffer4.diff
should be ok if tested
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
In fact, the RIAA has been known to suggest that students drop out
of college or go to community college in order to be able to afford
settlements. -- The RIAA
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100307/5af96390/attachment.pgp>
More information about the ffmpeg-devel
mailing list