On 02/07/2015 08:15 PM, Timothy Gu wrote:
On Sat Feb 07 2015 at 4:45:55 PM Rohit Kumar Singh <[email protected]>
wrote:
-    if (channels < 1 || channels > FLAC_MAX_CHANNELS)
-        return -1;
+    if (channels < 1 || channels > FLAC_MAX_CHANNELS) {
+        av_log(avctx, AV_LOG_ERROR, "invalid number of channels. \

+               Outside valid range of: 1 to %d\n", FLAC_MAX_CHANNELS);


Nope. Also remember to wrap long lines.

av_log(avctx, AV_LOG_ERROR, "Invalid number of channels. "
     "Only from 1 to %d-channel FLAC files are supported currently.\n",
     FLAC_MAX_CHANNELS);


+        return AVERROR_INVALIDDATA;


AVERROR_PATCHWELCOME

Not quite. The FLAC format specification only allows for up to 8 channels. This is not a limitation of the encoder but of the format itself.

-Justin

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to