[transcode] Fix problem for file types where ffmpeg decode returns 0

It seems ffmpeg/libav reads a file type like Monkey's audio in large
chunks, so that each packet must be passed to the decoder multiple
times. The decoder will return 0 until the packet is completed. This
change makes forked-daapd able to deal with a return value of 0.
This commit is contained in:
ejurgensen
2016-05-06 00:23:07 +02:00
parent 9a56044c77
commit 1fbb4b0d59
2 changed files with 3 additions and 5 deletions

View File

@@ -62,7 +62,7 @@ transcode_decoded_free(struct decoded_frame *decoded);
* @out decoded A newly allocated struct with a pointer to the frame and the
* stream. Must be freed with transcode_decoded_free().
* @in ctx Decode context
* @return Bytes read if OK, negative if error, 0 if EOF
* @return Positive if OK, negative if error, 0 if EOF
*/
int
transcode_decode(struct decoded_frame **decoded, struct decode_ctx *ctx);