avformat/img2dec: fix error code at EOF for pipes