[FFmpeg-devel] [PATCH] Psygnosis YOP demuxer
Thomas Higdon
thomas.p.higdon
Fri Aug 14 01:52:41 CEST 2009
On Thu, Aug 13, 2009 at 2:09 AM, Diego Biurrun<diego at biurrun.de> wrote:
> On Wed, Aug 12, 2009 at 11:00:52PM -0400, Thomas Higdon wrote:
>>
>> --- Changelog (revision 19610)
>> +++ Changelog (working copy)
>> @@ -31,6 +31,7 @@
>> ?- RTMP support in libavformat
>> ?- noX handling for OPT_BOOL X options
>> +- Add Psygnosis YOP demuxer
>
> Update needed.
Ok.
>> --- libavformat/yopdec.c ? ? ?(revision 0)
>> +++ libavformat/yopdec.c ? ? ?(revision 0)
>> @@ -0,0 +1,200 @@
>> +
>> +static int yop_probe(AVProbeData *probe_packet)
>> +{
>> + ? ?const char *yop_signature = "YO";
>> + ? ?if (memcmp(yop_signature, probe_packet->buf, strlen(yop_signature))) {
>> + ? ? ? ?return 0;
>> + ? ?}
>
> useless {}
>
>> + ? ?YopDecContext *yop = s->priv_data;
>> + ? ?ByteIOContext *pb = s->pb;
>
> align
>
>> + ? ?if (!video_stream->codec->extradata) {
>> + ? ? ? ?return AVERROR(ENOMEM);
>> + ? ?}
>
> useless {}
>
>> + ? ?if ((ret = get_buffer(pb, video_dec->extradata, 8)) != 8) {
>> + ? ? ? ?return -1;
>> + ? ?}
>
> useless {}, more below
>
>> + ? ?yop->sound_data_length = 1840 / 2;
>> + ? ?yop->sound_chunk_length = *(uint16_t *)(video_dec->extradata + 6);
>
> align, more below
I've made all of the cosmetic changes you've suggested. Do I take it
that all if() and for() clauses with a single line should not have
{}s? The decoder would need these changes as well in that case.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: yop-demux.diff
Type: text/x-patch
Size: 7574 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090813/07903e0d/attachment.bin>
More information about the ffmpeg-devel
mailing list