[FFmpeg-soc] [soc]: r5155 - spdif/spdif.c
Michael Niedermayer
michaelni at gmx.at
Tue Aug 18 01:02:10 CEST 2009
On Mon, Aug 17, 2009 at 11:13:48AM +0200, Benjamin Larsson wrote:
> Diego Biurrun wrote:
>> On Mon, Aug 17, 2009 at 10:53:52AM +0200, bwolowiec wrote:
>>
>>> Log:
>>> cosmetics: Reformat.
>>>
>>> --- spdif/spdif.c Mon Aug 17 10:51:09 2009 (r5154)
>>> +++ spdif/spdif.c Mon Aug 17 10:53:52 2009 (r5155)
>>> @@ -117,15 +117,9 @@ static int spdif_header_dts(AVFormatCont
>>> blocks++;
>>> switch (blocks) {
>>> - case 512 >> 5:
>>> - ctx->data_type = IEC958_DTS1;
>>> - break;
>>> - case 1024 >> 5:
>>> - ctx->data_type = IEC958_DTS2;
>>> - break;
>>> - case 2048 >> 5:
>>> - ctx->data_type = IEC958_DTS3;
>>> - break;
>>> + case 512 >> 5: ctx->data_type = IEC958_DTS1; break;
>>> + case 1024 >> 5: ctx->data_type = IEC958_DTS2; break;
>>> + case 2048 >> 5: ctx->data_type = IEC958_DTS3; break;
>>>
>>
>> This is not an improvement, on the contrary.
>>
>> Diego
>
> This is from Michaels comment.
yes, what problem does the new code have?
its IMHO more readable as its a nice table of lines for each case
with one row for the "before" value and one row for the "after" value
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Its not that you shouldnt use gotos but rather that you should write
readable code and code with gotos often but not always is less readable
-------------- 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-soc/attachments/20090818/48b3a533/attachment.pgp>
More information about the FFmpeg-soc
mailing list