History

lavc/utils: propagate or return meaningful error codes in avcodec_open2()

Stefano Sabatini committed 14 years ago

Commit 5ffadec1 parent 2fdc6f31 file · +3 −3Browse files

Unified · Split

libavcodec/utils.c+3−3
@@ -849,14 +849,14 @@ int attribute_align_arg avcodec_open2(AVCodecContext *avctx, const AVCodec *code · 848 unmodified lines
849 849
850 /* If there is a user-supplied mutex locking routine, call it. */850 /* If there is a user-supplied mutex locking routine, call it. */
851 if (ff_lockmgr_cb) {851 if (ff_lockmgr_cb) {
852 if ((*ff_lockmgr_cb)(&codec_mutex, AV_LOCK_OBTAIN))852 if ((ret = (*ff_lockmgr_cb)(&codec_mutex, AV_LOCK_OBTAIN)) < 0)
853 return -1;853 return ret;
854 }854 }
855 855
856 entangled_thread_counter++;856 entangled_thread_counter++;
857 if (entangled_thread_counter != 1) {857 if (entangled_thread_counter != 1) {
858 av_log(avctx, AV_LOG_ERROR, "Insufficient thread locking around avcodec_open/close()\n");858 av_log(avctx, AV_LOG_ERROR, "Insufficient thread locking around avcodec_open/close()\n");
859 ret = -1;859 ret = AVERROR(EINVAL);
860 goto end;860 goto end;
861 }861 }
862 862

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t